package com.whfc.fmam.entity.enums;

/**
 * @Description: 单据来源:0-称重 1-补录 2-移动验收
 * @author: qinzexing
 * @version: 1.0
 * @date: 2020/4/24 14:43
 */
public enum WeightNoteSourceType {

    WEIGHING(0, "称重"),

    MAKE_UP(1, "补录"),

    CHECK(2, "移动验收");

    private Integer value;

    private String desc;

    WeightNoteSourceType(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static WeightNoteSourceType parseValue(Integer value) {
        switch (value) {
            case 0:
                return WEIGHING;
            case 1:
                return MAKE_UP;
            case 2:
                return CHECK;
            default:
                return null;
        }
    }
}
